<?php

namespace App\Validate\api;

use Illuminate\Foundation\Http\FormRequest;
use App\Validate\BaseValidate;

class CartoonValidate extends BaseValidate
{

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'=>'required',
            'img'=>'required',
            'cartoon_id'=>'required',
            'phone'=>'required',
            'id'=>'required',
            'nickname'=>'required',
            'phone'=>'required',

        ];
    }

    public function messages()
    {
        return [
            'name.required'=>'请输入漫画名称',
            'img.required'=>'请添加封面',
            'cartoon_id.required'=>'请提交cartoon_id',
            'phone.required'=>'请填写手机号',
            'id.required'=>'请填写ID',
            'nickname.required'=>'请填写名称',
            'phone.required'=>'请填写手机号',

        ];
    }

    public $scenes = [
        'addCartoon' => ['name','img'],
        'addCartoonMembers' => ['cartoon_id','phone','nickname','phone'],
        'addCartoonRole' => ['roles'],
        'delCartoonMembers' => ['id'],
        'getCartoonMembers' => ['cartoon_id'],
        'saveCartoonMembers' => ['id','nickname'],
    ];
}
